package gof.com.yew.observer;

public class ObserverA implements Observer {
	
	private int  state;
	
	public ObserverA(Subject s) {
		  s.register(this);
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}
	
	@Override
	public void update(Subject s) {
		this.state = ((ConcreteSubject)s).getState();
	}

}
